import requests
from config import local_host


class IhrmLoginApi:
    login_url = local_host + "/api/sys/login"

    @classmethod
    def ihrm_login(cls, mobile, password):
        # cls代表类，self代表对象（类是特殊的对象）
        login_json = {"mobile": mobile, "password": password}
        resp = requests.post(url=cls.login_url,json=login_json)
        return resp

